package com.hzyb.oldpack.service.impl;

import java.util.HashMap;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.hzyb.oldpack.dao.JdbcDao;
import com.hzyb.oldpack.service.ShopNewProductService;
@Service
public class ShopNewProductServiceImpl implements ShopNewProductService{

	@Resource
	private JdbcDao jdbcDao;

	@Override
	public Map<String, Object> getNewProduct(String is_more) {
		Map<String, Object> map=new HashMap<>();
		if(is_more.equals("0")) {
			map.put("newProduct", jdbcDao.getNewProduct("1"));
			map.put("secondNewProduct", jdbcDao.getNewProduct("0"));
		}
		if(is_more.equals("1")) {
			map.put("data", jdbcDao.getNewProduct("-1"));
		}
		return map;
	}


}
